package cc.cix.hq.org.dto.request;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;

/**
 * @author cix
 */
@Data
@ApiModel(value = "MenuDTO", description = "菜单")
public class MenuReq {

    @ApiModelProperty("菜单ID")
    private Long id;

    @ApiModelProperty("上级菜单ID")
    private Long parentId;

    @NotBlank(message = "名称不能为空")
    @Length(max = 20, message = "长度非法")
    @ApiModelProperty("菜单/按钮名称")
    private String menuName;

    @ApiModelProperty("菜单URL")
    private String path;

    @ApiModelProperty("权限标识")
    private String perms;

    @ApiModelProperty("图标")
    private String icon;

    @ApiModelProperty("类型: 0=菜单，1=按钮")
    private String type;

    @ApiModelProperty("排序")
    private Integer orderNum;

}
